<script setup>
import { onMounted, nextTick, ref, reactive, watch } from 'vue'
import mitt from "../assets/js/mitt"

let name=ref("aaa")
onMounted(() => {
  mitt.on("test1", data => {
    console.log(data);
    name.value=data.name
  });
})
</script>

<template>
  <p>{{name}}</p>
</template>

<style lang='less'>

</style>